<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>角色编辑页面</title>
    <%@ include file="../../../common/meta.jsp" %>
    <link href="${ctx}/css/page/common-win.css?t=${now}" rel="stylesheet">
    <%--<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">--%>
    <link href="${ctx}/css/ztree/awesomeStyle/awesome.css" rel="stylesheet">
    <script src="${ctx}/js/ztree/jquery.ztree.core.js"></script>
    <script src="${ctx}/js/ztree/jquery.ztree.exedit.js"></script>
    <script src="${ctx}/js/ztree/jquery.ztree.excheck.js"></script>
    <script src="${ctx}/js/plugins/validate/jquery.validate.custom.js?t=20181024"></script>
</head>
<style>
    ul.ztree li{
        list-style: none;
        background-color: inherit;
        /*三遍问先*/
        border-top : 1px solid #e7eaec;
        border-left : 1px solid #e7eaec;
        border-right : 1px solid #e7eaec;
        display: block;
        margin-bottom: -1px;
        padding: 10px 15px;
        position: relative;
        list-style: none!important;
    }
    ul.ztree li:last-child{
        margin-bottom: 0;
        border-bottom-right-radius: 4px;
        border-bottom-left-radius: 4px;
        border-bottom : 1px solid #e7eaec;
    }
    ul.ztree ul li>span[treenode_switch]{
        display: none!important;
    }
    span[treenode_ico]{
        display: none!important;
    }
    /*span[]{*/
        /*display: none!important;*/
    /*}*/

</style>
<script>
    var editType = '${type}';
    var list = ${list};
    var oneRoleInfo = ${role};
    var searchInfo = ${searchInfo};
</script>
<body class="gray-bg">
<div class="myContent">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>角色信息</h5>
                </div>
                <div class="ibox-content">
                    <h5><i class="fa fa-file-text"></i>  基本信息</h5>
                    <hr>
                    <form class="form-horizontal m-t" id="mainForm">
                        <input type="hidden" id="id" name="id" value="${not empty role ? role.id : ''}">
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span style="color: red">*</span>角色名称：</label>
                            <div class="col-sm-7">
                                <input type="text" id="roleName" name="roleName" class="form-control" maxlength="20" required value="${not empty role ? role.roleName : ''}">
                            </div>
                            <div class="tip"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">排序：</label>
                            <div class="col-sm-7">
                                <input type="text" id="sortNum" name="sortNum" class="form-control" maxlength="9" isPInteger="true" value="${not empty role ? role.sortNum : ''}">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">备注：</label>
                            <div class="col-sm-7">
                                <textarea type="text" id="remark" name="remark" class="form-control" style="height: 80px; resize: none;" maxlength="200">${not empty role ? role.remark : ''}</textarea>
                            </div>
                        </div>
                        <h5><i class="fa fa-file-text"></i>  模块权限</h5>
                        <hr>
                        <div id="tree"></div>

                        <div class="row row-lg col-sm-12" >
                            <ul id="ztree" class="ztree"></ul>
                        </div>

                        <div class="form-group" >
                            <div class="col-sm-4 col-sm-offset-5">
                                <c:if test="${type!='info'}">
                                    <button class="btn btn-primary" type="submit" onclick="doSave()">保存</button>
                                </c:if>
                                <input type="button" class="btn btn-white" onclick="doBack()" value="返回">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<script src="${ctx}/js/sys/role/win/editPfRoleMgr.js?time=${now}"></script>
<c:if test="${type=='info'}">
    <script src="${ctx}/js/common/myDisabled.js?t=${now}"></script>
</c:if>
</body>
</html>
